﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WQDSkin
{
    /// <summary>
    /// DataGrid.xaml 的交互逻辑
    /// </summary>
    public partial class DemoDataGrid : Window
    {
        public DemoDataGrid()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List<Penson> pensons = new List<Penson>();
            //for (int i = 0; i < 100; i++)
            //{
            //    pensons.Add(new Penson()
            //    { Name = $"4002Name{i}", Age = i, School = $"School{i}" }
            //    );
            //}

            this.dgv.ItemsSource = pensons;
            this.dgv2.ItemsSource = pensons;
        }
    }

    public class Penson
    {
        private int age; 
        public int Age
        {
            get { return age; }
            set { age = value; }
        }

        public string Name { get; set; }

        public string School { get; set; }
    }
}
